import Vue from "vue";
import App from "./App.vue";

Vue.config.productionTip = false;
import router from "./router";
import store from "@/store";

// 注册TypeNav为全局组件
import TypeNav from "@/components/TypeNav";
Vue.component("TypeNav", TypeNav);
// 注册Pagination为全局组件
import Pagination from "@/components/Pagination";
Vue.component("Pagination", Pagination);
// 使用mock
import "@/mock";

// 导入图片懒加载
import VueLazyload from 'vue-lazyload'
import loading from '@/assets/images/loading.gif'
Vue.use(VueLazyload,{
  loading
})

import { Message,MessageBox } from "element-ui";
// Vue.use(Button)
// Vue.use(Message)
Vue.prototype.$message = Message;
Vue.prototype.$msgbox =MessageBox;
Vue.prototype.$alert = MessageBox.alert;

import '@/utils/validate'

new Vue({
  render: (h) => h(App),
  router,
  store,
  beforeCreate() {
    Vue.prototype.$bus = this;
  },
}).$mount("#app");
